import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/usercenter',
      name: 'usercenter',
      component: ()=>import('../views/UserCenter.vue'),
    },
    {
      path: '/lovereport',
      name: 'lovereport',
      component: ()=>import('../views/LoveReport.vue'),
    },
    {
      path: '/myservice/:id?',
      name: 'myservice',
      component: ()=>import('../views/Myservice.vue'),
    },
    {
      path: '/servicerecords',
      name: 'servicerecords',
      component: ()=>import('../views/ServiceRecords.vue'),
      
    },
    {
      path: '/actslist',
      name: 'actslist',
      component: ()=>import('../views/ActsList.vue'),
    },
    {
      path: '/actsinfo/:id',
      name: 'actsinfo',
      component: ()=>import('../views/ActsInfo.vue'),
    },
    {
      path: '/myregistration',
      name: 'myregistration',
      component: ()=>import('../views/MyRegistration.vue'),
    },
    {
      path: '/serviceinfo/:id?',
      name: 'serviceinfo',
      component: ()=>import('../views/ServiceInfo.vue'),
    },
  ],
})

export default router
